\hypertarget{classBlockingQueue}{}\section{Blocking\+Queue$<$ T $>$ 模板类 参考}
\label{classBlockingQueue}\index{Blocking\+Queue$<$ T $>$@{Blocking\+Queue$<$ T $>$}}


\hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列(\+F\+I\+F\+O)  




{\ttfamily \#include $<$blockingqueue.\+hpp$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classBlockingQueue_a42f821a61ba22ba27e6d1a434ab27eb2}\label{classBlockingQueue_a42f821a61ba22ba27e6d1a434ab27eb2}} 
\hyperlink{classBlockingQueue_a42f821a61ba22ba27e6d1a434ab27eb2}{Blocking\+Queue} ()
\begin{DoxyCompactList}\small\item\em \hyperlink{classBlockingQueue}{Blocking\+Queue} 默认构造函数 \end{DoxyCompactList}\item 
\hyperlink{classBlockingQueue_a265931efcceccd5c99ac76178507559b}{Blocking\+Queue} (std\+::initializer\+\_\+list$<$ T $>$ \&args)
\begin{DoxyCompactList}\small\item\em \hyperlink{classBlockingQueue}{Blocking\+Queue} 初始化列表构造函数 \end{DoxyCompactList}\item 
\hyperlink{classBlockingQueue_a2f2b1e4d887d77a81fddabd44c5cdbfd}{Blocking\+Queue} (const \hyperlink{classBlockingQueue}{Blocking\+Queue} \&)
\begin{DoxyCompactList}\small\item\em \hyperlink{classBlockingQueue}{Blocking\+Queue} 拷贝构造 \end{DoxyCompactList}\item 
\hyperlink{classBlockingQueue_a0d375ec5bec4f19887d0a4757d95e087}{Blocking\+Queue} (const \hyperlink{classBlockingQueue}{Blocking\+Queue} \&\&rh)
\begin{DoxyCompactList}\small\item\em \hyperlink{classBlockingQueue}{Blocking\+Queue} 复制构造函数 \end{DoxyCompactList}\item 
\hyperlink{classBlockingQueue}{Blocking\+Queue} \& \hyperlink{classBlockingQueue_aaee07bb9044a01b4cb0af75748795325}{operator=} (const \hyperlink{classBlockingQueue}{Blocking\+Queue} \&)
\begin{DoxyCompactList}\small\item\em operator= 赋值运算符 \end{DoxyCompactList}\item 
\hyperlink{classBlockingQueue}{Blocking\+Queue} \& \hyperlink{classBlockingQueue_abbe4440d6ed06d175925bba1f3c02312}{operator=} (const \hyperlink{classBlockingQueue}{Blocking\+Queue} \&\&)
\begin{DoxyCompactList}\small\item\em operator= 赋值运算符 \end{DoxyCompactList}\item 
T \hyperlink{classBlockingQueue_a93c17143222334c4e4fe7035d4068bd0}{back} ()
\begin{DoxyCompactList}\small\item\em back 得到最后一个元素 \end{DoxyCompactList}\item 
T \hyperlink{classBlockingQueue_adc86e513ba273cfa07cf5293806df412}{front} ()
\begin{DoxyCompactList}\small\item\em front 得到第一个元素 \end{DoxyCompactList}\item 
void \hyperlink{classBlockingQueue_a1c824f8d644951d25bed9825794ddeae}{put} (const T \&x)
\begin{DoxyCompactList}\small\item\em put 插入 \end{DoxyCompactList}\item 
void \hyperlink{classBlockingQueue_acedd6887a4af752440fb2dcd04292fa3}{put} (const T \&\&x)
\begin{DoxyCompactList}\small\item\em put 插入 \end{DoxyCompactList}\item 
T \hyperlink{classBlockingQueue_aac788baea510940fc40961a285bacc5f}{take} ()
\begin{DoxyCompactList}\small\item\em take 弹出队列元素 \end{DoxyCompactList}\item 
void \hyperlink{classBlockingQueue_a8efc43c38666a38402c39f772da63fcf}{wait\+\_\+and\+\_\+pop} (T \&value)
\begin{DoxyCompactList}\small\item\em wait\+\_\+and\+\_\+pop 弹出队列元素 \end{DoxyCompactList}\item 
bool \hyperlink{classBlockingQueue_a47a2d7726112b4e2d7b3f65a4e84aa06}{try\+\_\+pop} (T \&value)
\begin{DoxyCompactList}\small\item\em wait\+\_\+and\+\_\+pop 弹出队列元素 \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{classBlockingQueue_a733361d5721c6ba64af3e129921c43b0}{size} () const
\begin{DoxyCompactList}\small\item\em size 返回元素个数 \end{DoxyCompactList}\item 
bool \hyperlink{classBlockingQueue_a06f9211f5225bb6413f403e8d14ca7ce}{is\+\_\+empty} () const
\begin{DoxyCompactList}\small\item\em is\+\_\+empty 判断队列是否为空 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
\subsubsection*{template$<$typename T$>$\newline
class Blocking\+Queue$<$ T $>$}

\hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列(\+F\+I\+F\+O) 

\subsection{构造及析构函数说明}
\mbox{\Hypertarget{classBlockingQueue_a265931efcceccd5c99ac76178507559b}\label{classBlockingQueue_a265931efcceccd5c99ac76178507559b}} 
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{Blocking\+Queue()}{BlockingQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
\hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::\hyperlink{classBlockingQueue}{Blocking\+Queue} (\begin{DoxyParamCaption}\item[{std\+::initializer\+\_\+list$<$ T $>$ \&}]{args }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



\hyperlink{classBlockingQueue}{Blocking\+Queue} 初始化列表构造函数 


\begin{DoxyParams}{参数}
{\em args} & 初始化列表 \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classBlockingQueue_a2f2b1e4d887d77a81fddabd44c5cdbfd}\label{classBlockingQueue_a2f2b1e4d887d77a81fddabd44c5cdbfd}} 
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{Blocking\+Queue()}{BlockingQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::\hyperlink{classBlockingQueue}{Blocking\+Queue} (\begin{DoxyParamCaption}\item[{const \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \&}]{rh }\end{DoxyParamCaption})}



\hyperlink{classBlockingQueue}{Blocking\+Queue} 拷贝构造 


\begin{DoxyParams}{参数}
{\em rh} & \hyperlink{classBlockingQueue}{Blocking\+Queue}\& 阻塞队列 \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classBlockingQueue_a0d375ec5bec4f19887d0a4757d95e087}\label{classBlockingQueue_a0d375ec5bec4f19887d0a4757d95e087}} 
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\index{Blocking\+Queue@{Blocking\+Queue}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{Blocking\+Queue()}{BlockingQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::\hyperlink{classBlockingQueue}{Blocking\+Queue} (\begin{DoxyParamCaption}\item[{const \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \&\&}]{rh }\end{DoxyParamCaption})}



\hyperlink{classBlockingQueue}{Blocking\+Queue} 复制构造函数 


\begin{DoxyParams}{参数}
{\em rh} & \hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列 \\
\hline
\end{DoxyParams}


\subsection{成员函数说明}
\mbox{\Hypertarget{classBlockingQueue_a93c17143222334c4e4fe7035d4068bd0}\label{classBlockingQueue_a93c17143222334c4e4fe7035d4068bd0}} 
\index{Blocking\+Queue@{Blocking\+Queue}!back@{back}}
\index{back@{back}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{back()}{back()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
T \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::back (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



back 得到最后一个元素 

\begin{DoxyReturn}{返回}
最后一个元素 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_adc86e513ba273cfa07cf5293806df412}\label{classBlockingQueue_adc86e513ba273cfa07cf5293806df412}} 
\index{Blocking\+Queue@{Blocking\+Queue}!front@{front}}
\index{front@{front}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{front()}{front()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
T \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::front (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



front 得到第一个元素 

\begin{DoxyReturn}{返回}
第一个元素 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_a06f9211f5225bb6413f403e8d14ca7ce}\label{classBlockingQueue_a06f9211f5225bb6413f403e8d14ca7ce}} 
\index{Blocking\+Queue@{Blocking\+Queue}!is\+\_\+empty@{is\+\_\+empty}}
\index{is\+\_\+empty@{is\+\_\+empty}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{is\+\_\+empty()}{is\_empty()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
bool \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::is\+\_\+empty (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



is\+\_\+empty 判断队列是否为空 

\begin{DoxyReturn}{返回}
true -\/ 队列为空 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_aaee07bb9044a01b4cb0af75748795325}\label{classBlockingQueue_aaee07bb9044a01b4cb0af75748795325}} 
\index{Blocking\+Queue@{Blocking\+Queue}!operator=@{operator=}}
\index{operator=@{operator=}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \& \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::operator= (\begin{DoxyParamCaption}\item[{const \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \&}]{rh }\end{DoxyParamCaption})}



operator= 赋值运算符 

\begin{DoxyReturn}{返回}
rh \hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列的引用 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_abbe4440d6ed06d175925bba1f3c02312}\label{classBlockingQueue_abbe4440d6ed06d175925bba1f3c02312}} 
\index{Blocking\+Queue@{Blocking\+Queue}!operator=@{operator=}}
\index{operator=@{operator=}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{operator=()}{operator=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \& \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::operator= (\begin{DoxyParamCaption}\item[{const \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$ \&\&}]{rh }\end{DoxyParamCaption})}



operator= 赋值运算符 


\begin{DoxyParams}{参数}
{\em rh} & \hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
\hyperlink{classBlockingQueue}{Blocking\+Queue} 阻塞队列的引用 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_a1c824f8d644951d25bed9825794ddeae}\label{classBlockingQueue_a1c824f8d644951d25bed9825794ddeae}} 
\index{Blocking\+Queue@{Blocking\+Queue}!put@{put}}
\index{put@{put}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::put (\begin{DoxyParamCaption}\item[{const T \&}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



put 插入 


\begin{DoxyParams}{参数}
{\em x} & \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classBlockingQueue_acedd6887a4af752440fb2dcd04292fa3}\label{classBlockingQueue_acedd6887a4af752440fb2dcd04292fa3}} 
\index{Blocking\+Queue@{Blocking\+Queue}!put@{put}}
\index{put@{put}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::put (\begin{DoxyParamCaption}\item[{const T \&\&}]{x }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



put 插入 


\begin{DoxyParams}{参数}
{\em x} & \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classBlockingQueue_a733361d5721c6ba64af3e129921c43b0}\label{classBlockingQueue_a733361d5721c6ba64af3e129921c43b0}} 
\index{Blocking\+Queue@{Blocking\+Queue}!size@{size}}
\index{size@{size}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{size()}{size()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
size\+\_\+t \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



size 返回元素个数 

\begin{DoxyReturn}{返回}
元素个数 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_aac788baea510940fc40961a285bacc5f}\label{classBlockingQueue_aac788baea510940fc40961a285bacc5f}} 
\index{Blocking\+Queue@{Blocking\+Queue}!take@{take}}
\index{take@{take}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{take()}{take()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
T \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::take (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



take 弹出队列元素 

\begin{DoxyReturn}{返回}
队列元素 
\end{DoxyReturn}
\mbox{\Hypertarget{classBlockingQueue_a47a2d7726112b4e2d7b3f65a4e84aa06}\label{classBlockingQueue_a47a2d7726112b4e2d7b3f65a4e84aa06}} 
\index{Blocking\+Queue@{Blocking\+Queue}!try\+\_\+pop@{try\+\_\+pop}}
\index{try\+\_\+pop@{try\+\_\+pop}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{try\+\_\+pop()}{try\_pop()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
bool \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::try\+\_\+pop (\begin{DoxyParamCaption}\item[{T \&}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



wait\+\_\+and\+\_\+pop 弹出队列元素 


\begin{DoxyParams}{参数}
{\em value} & 弹出元素赋值对象 \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{classBlockingQueue_a8efc43c38666a38402c39f772da63fcf}\label{classBlockingQueue_a8efc43c38666a38402c39f772da63fcf}} 
\index{Blocking\+Queue@{Blocking\+Queue}!wait\+\_\+and\+\_\+pop@{wait\+\_\+and\+\_\+pop}}
\index{wait\+\_\+and\+\_\+pop@{wait\+\_\+and\+\_\+pop}!Blocking\+Queue@{Blocking\+Queue}}
\subsubsection{\texorpdfstring{wait\+\_\+and\+\_\+pop()}{wait\_and\_pop()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{classBlockingQueue}{Blocking\+Queue}$<$ T $>$\+::wait\+\_\+and\+\_\+pop (\begin{DoxyParamCaption}\item[{T \&}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



wait\+\_\+and\+\_\+pop 弹出队列元素 


\begin{DoxyParams}{参数}
{\em value} & 弹出元素赋值对象 \\
\hline
\end{DoxyParams}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
blockingqueue.\+hpp\end{DoxyCompactItemize}
